package com.manager;

import java.util.List;

/**
 * 
 * Copyrights 1997-2008 西安协同时光软件有限公司<br />
 * 
 * Filename:BaseDao.java<br />
 * 
 * Description:基础DAO接口,需要增,删,改,根据pk查询,查询列表方法<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: peigen<br />
 * 
 * History: <br />
 * [ Author 	   Date 	Version	 Content ]<br /> 
 *   peigen 	2008-07-29	 V0.1 	  create <br />
 * 
 */
public interface IBaseDao {


	public void insert(IBaseBean entity);

	public void delete(IBaseBean entity);
	
	public void deleteList(List<IBaseBean> list);

	public void update(IBaseBean entity);

	public void update(String statementName, IBaseBean entity);
	
	public IBaseBean queryByPk(IBaseBean entity, Long pk);
	
	public IBaseBean queryByPk(IBaseBean entity, Integer pk);
	
	public List<IBaseBean> queryAll(IBaseBean entity);
	
	public List<IBaseBean> queryForList(String selectName, IBaseBean entity);

	public List<IBaseBean> queryForList(String beanName,
			String strConditionName, String strCondition);
	
	public int getSize();

	public int getPage(int pageSize);

	public List<IBaseBean> getListForPage(String sql, final int firstResult,
			final int maxResults);
    
	public List<IBaseBean> getListForPage(String sql);
	
	public List getMaxId(String tableName, String idName);
	

	public IBaseBean queryByPk(IBaseBean entity, String pk);
	
}
